package com.ssy.lingxi.member.merchant.api.fallback.inner;

import com.ssy.lingxi.common.response.ResponseCode;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.member.merchant.api.feign.inner.MemberAuthTypeConfigFeign;
import com.ssy.lingxi.member.merchant.api.model.vo.inner.request.AuthConfigVO;
import com.ssy.lingxi.member.merchant.api.model.vo.inner.request.DeleteAuthConfigVO;
import org.springframework.stereotype.Component;

import javax.validation.Valid;

/**
 * 实名验证服务Fallback类
 *
 * @author lqa
 * @version 2.0.0
 * @date 2022/1/12
 */
@Component
public class MemberAuthTypeConfigFeignFallback implements MemberAuthTypeConfigFeign {
    /**
     * 查询当前配置的实名验证类型
     *
     * @return 实名验证类型: 1-百度，
     */
    @Override
    public Wrapper<Integer> getAuthType() {
        return Wrapper.fail(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

    /**
     * 添加或修改实名验证公共参数
     *
     * @param authConfigVO 实名验证公共参数
     * @return 操作结果
     */
    @Override
    public Wrapper<Boolean> saveOrUpdateAuthConfig(@Valid AuthConfigVO authConfigVO) {
        return Wrapper.fail(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

    /**
     * 删除实名验证公共参数
     *
     * @param deleteAuthConfigVO 请求参数
     * @return 操作结果
     */
    @Override
    public Wrapper<Boolean> deleteAuthConfig(@Valid DeleteAuthConfigVO deleteAuthConfigVO) {
        return Wrapper.fail(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

    /**
     * 清空实名验证内容
     *
     * @return 是否成功
     */
    @Override
    public Wrapper<Boolean> clearAuth() {
        return Wrapper.fail(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }
}
